package com.pqy.ts.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;

import java.util.ArrayList;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author panqiyi
 * @since 2022-06-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class TComment implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    private String avatar;

    private String username;

    private String content;

    private String itemId;

    private String userId;

    private String parentId;

    private String parentName;


    @TableField(fill = FieldFill.INSERT)
    private Date tCreate;

    @TableField(exist = false) // 不用映射,既数据库没有该字段
    private List<TComment> reply = new ArrayList<>(); //子 一个父回复有多个子回复
}
